#include <stdio.h> 
main()
{
  int i,a,b,c,k;
  k=0;
  for(i=100;i<=999;i++)
  {
  a=i/100;
  b=(i%100)/10;
  c=i%10;
  if(i==a*a*a+b*b*b+c*c*c)
  {
  	printf("%d ",i);k++;
  if(k%2==0)
  	printf("\n");
  }
  }
}
